package cn.sh.tools.controller;

import cn.sh.tools.service.component.image.PhotoComponent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Description 文件
 * @Classname FileController
 * @Date 2023/8/4
 * @Author sh
 **/
@Api(tags = "照片")
@RestController
@RequestMapping(value = "/photo")
public class PhotoController {

    @Resource
    private PhotoComponent photoComponent;

    @ApiOperation("获取指定照片的exif信息")
    @RequestMapping(method = RequestMethod.POST, value = "/getPhotoMetaInfo")
    public Map<String, Object> getPhotoMetaInfo(@RequestParam(value = "photoPath") String photoPath) {
        return this.photoComponent.getPhotoMetaInfo(photoPath);
    }

}
